<?php
/**
 * Description of Core_Singleton
 * @package Core
 * @author superx
 */
abstract class Core_Singleton {
    protected static $_singletonStack;

    /**
     * @return $this
     */
    public static function getInstance(){
        $class = get_called_class();
        if (empty(self::$_singletonStack[$class])){
            self::$_singletonStack[$class] = new $class();
        }
        return self::$_singletonStack[$class];
    }

    protected function __construct()
    {

    }
}